<?php get_header(); ?>  

<style>

#headerss{height:101px;}
.post-wrapper h3{display:none;}

</style>
<!-- include jQuery library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<!-- include Cycle plugin -->
<script type="text/javascript" src="http://malsup.github.com/jquery.cycle.all.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'scrollLeft',
		delay: 5000

	});
});
</script>
	<?php 
		$subcategories = get_categories('&child_of=4&hide_empty');
$cnt1= 0;
?>

<div class="slideshow" style="background:#666;">

<div class="slide">
<?php


//echo "<pre>";
foreach ($subcategories as $subcategory) {
  //print_r($subcategory); continue;
$catlink = get_category_link($subcategory->term_id);
$catname = $subcategory->name;
$caticon = "select * from wp_ig_caticons where cat_id='".$subcategory->term_id."'";
$qun = mysql_query($caticon);
$datacat = $wpdb->get_results($caticon);
$count = mysql_num_rows($qun);
if($count >0){
$cnt1++;
}
if($cnt1==5 || $cnt1==9 || $cnt1==13 || $cnt1==17 || $cnt1==21 || $cnt1==25 || $cnt1==29 || $cnt1==33 || $cnt1==37){ ?>
</div><div class="slide"> 
<?php } 
foreach ($datacat as $dct) {
$catpath = 'http://bigvoicesmedia.biz/'.$dct->icon;	
 ?>
	
		<a href="<?php echo $catlink; ?>" class="network"><img src="<?php echo $catpath; ?>" width="89" height="75" /></a>
			<?php } }  ?></div></div>
			


<?php if (get_option('evid_featured') == 'on') { get_template_part('includes/featured'); } ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php
	
// Get the current category

$category = get_the_category($post->ID);
$category_id = $category[0]->term_id;

$photo1 = $wpdb->get_var("SELECT photo1 FROM $wpdb->terms WHERE term_id=" . $category_id);
$photo2 = $wpdb->get_var("SELECT photo2 FROM $wpdb->terms WHERE term_id=" . $category_id);

if(isset($photo2) && $photo2 != "") {
    echo "<div class='full-wide'><img src='$photo2' alt=''>";
    if(isset($photo1) && $photo1 != "") {
        echo "<div class='avatar'><img src='$photo1' alt=''></div>";
    }
    echo '</div>';
}
?>



<?php $video = get_post_meta($post->ID, 'Video', $single = true); ?>
<?php $video = preg_replace('/<embed /','<embed wmode="transparent" ',$video);
$video = preg_replace('/<\/object>/','<param name="wmode" value="transparent" /></object>',$video); ?>
<?php if($video !== '') : ?>
<div id="header4">
    <div id="header5">
        <div class="video-nav ievideo-nav" style="margin-left: 100px;"> <span class="video-button-hover"> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-embed.png" style="margin: 2px 0px 0px 0px; border: none; cursor: pointer;" alt="embed" /> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-embed-hover.gif" alt="embed" class="embed-button video-button-hover-image"  /> </span> <span class="video-button-hover"> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-share.png" style="margin: 2px 0px 0px 0px; border: none; cursor: pointer;" alt="share" /> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-share-hover.gif" alt="share" class="share-button video-button-hover-image"  /> </span> <span class="video-button-hover"> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-link.png" style="margin: 2px 0px 0px 0px; border: none; cursor: pointer;" alt="link" /> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-link-hover.gif" alt="link" class="link-button video-button-hover-image"  /> </span> <span class="video-button-hover"> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-comment.png" style="margin: 2px 0px 0px 0px; border: none; cursor: pointer;" alt="comment"  /> <a href="#respond" class="video-button-hover-image" ><img src="<?php bloginfo('template_directory'); ?>/images/video-button-comment-hover.gif" alt="comment" style="border: none;" class="comment-button" /></a> </span> </div>
        <div id="video">
            <div id="video-inside"> <?php echo $video; ?> </div>
        </div>
        <div class="video-embed video2"> <span class="video-titles"><?php esc_html_e('Embed This Video','eVid') ?></span> <img src="<?php bloginfo('template_directory'); ?>/images/close.png" style="margin: 10px 10px 0px 0px; float: right; cursor: pointer;" alt="close" class="close" />
            <div style="clear: both;"></div>
            <textarea rows="4" style="border:1px solid #1F1F1F; width:90%; height: 200px; background:#373737; padding:10px; color:#CCCCCC; margin-left: 15px; float: left; margin-top: 15px;"><?php echo get_post_meta($post->ID, "Video", true); ?>
</textarea>
        </div>
        <div class="video-share video2"> <span class="video-titles"><?php esc_html_e('Share This Video','eVid') ?></span> <img src="<?php bloginfo('template_directory'); ?>/images/close.png" style="margin: 10px 10px 0px 0px; float: right; cursor: pointer;" alt="close" class="close" />
            <div style="clear: both;"></div>
            <a href="http://del.icio.us/post?url=<?php the_permalink() ?>&amp;title=<?php the_title(); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bookmark-1.gif" alt="bookmark" style="float: left; margin-left: 15px; margin-right: 8px; border: none;" /></a> <a href="http://www.digg.com/submit?phase=2&amp;url=<?php the_permalink() ?>&amp;title=<?php the_title(); ?>"  target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bookmark-2.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.reddit.com/submit?url=<?php the_permalink() ?>&amp;title=<?php the_title(); ?>"  target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bookmark-3.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.stumbleupon.com/submit?url=<?php the_permalink() ?>&amp;title=<?php the_title(); ?>"  target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bookmark-4.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.squidoo.com/lensmaster/bookmark?<?php the_permalink() ?>"  target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bookmark-5.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=<?php the_title(); ?>&amp;u=<?php the_permalink() ?>"  target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bookmark-6.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=<?php the_permalink() ?>&amp;title=<?php the_title(); ?>"  target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bookmark-7.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=<?php the_permalink() ?>&amp;Title=<?php the_title(); ?>"  target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bookmark-8.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.technorati.com/faves?add=<?php the_permalink() ?>"  target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bookmark-9.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.furl.net/storeIt.jsp?t=<?php the_title(); ?>&amp;u=<?php the_permalink() ?>"  target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bookmark-10.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://twitter.com/home?status=<?php the_title(); echo(' '); echo $permalink; ?>"  target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bookmark-11.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.mixx.com/submit?page_url=<?php the_permalink(); ?>&amp;title=<?php the_title(); ?>"  target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bookmark-12.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> </div>
        <div class="video-link video2"> <span class="video-titles"><?php esc_html_e('Link To This Video','eVid') ?></span> <img src="<?php bloginfo('template_directory'); ?>/images/close.png" style="margin: 10px 10px 0px 0px; float: right; cursor: pointer;" alt="close" class="close" />
            <div style="clear: both;"></div>
            <textarea rows="4" style="border:1px solid #1F1F1F; width:90%; height: 200px; background:#373737; padding:10px; color:#CCCCCC; margin-left: 15px; float: left; margin-top: 15px;">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(esc_attr__('Permanent Link to %s','eVid'), get_the_title()) ?>"><?php the_title(); ?></a>
</textarea>
        </div>
        <div class="video-comment video2"> <img src="<?php bloginfo('template_directory'); ?>/images/close.png" style="margin: 10px 10px 0px 0px; float: right; cursor: pointer;" alt="embed" class="close" /> <?php esc_html_e('test','eVid') ?> </div>
        <div class="video-rate video2"> <span class="video-titles"><?php esc_html_e('Rate This Video','eVid') ?></span> <img src="<?php bloginfo('template_directory'); ?>/images/close.png" style="margin: 10px 10px 0px 0px; float: right; cursor: pointer;" alt="embed" class="close" />
            <div style="clear: both;"></div>
            <div style="border:1px solid #1F1F1F; width:90%; height: 200px; background:#373737; padding:10px; color:#CCCCCC; margin-left: 15px; float: left; margin-top: 15px;">
                <?php if(function_exists('the_ratings')) { the_ratings(); } ?>
            </div>
        </div>
        <div class="video-tags video2"> <span class="video-titles"><?php esc_html_e('Tags For This Video','eVid') ?></span> <img src="<?php bloginfo('template_directory'); ?>/images/close.png" style="margin: 10px 10px 0px 0px; float: right; cursor: pointer;" alt="tags" class="close" />
            <div style="clear: both;"></div>
            <?php the_tags('', ' ', ''); ?>
        </div>
        <div class="video-related video2"> <span class="video-titles"><?php esc_html_e('Related Videos','eVid') ?></span> <img src="<?php bloginfo('template_directory'); ?>/images/close.png" style="margin: 10px 10px 0px 0px; float: right; cursor: pointer;" alt="related posts" class="close" />
            <div style="clear: both;"></div>
            <?php //wp_related_posts(); ?>
        </div>
        <div class="video-nav"> <span class="video-button-hover"> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-rate.png" style="margin: 2px 0px 0px 0px; border: none; cursor: pointer;" alt="rate" /> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-rate-hover.gif" alt="rate" style="left: 5px !important;" class="rate-button video-button-hover-image"  /> </span> <span class="video-button-hover"> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-tags.png" style="margin: 2px 0px 0px 0px; border: none; cursor: pointer;" alt="tags" /> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-tags-hover.gif" alt="tags" style="left: 5px !important;" class="tags-button video-button-hover-image"  /> </span> <span class="video-button-hover"> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-related.png" style="margin: 2px 0px 0px 0px; border: none; cursor: pointer;" alt="related" /> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-related-hover.gif" alt="related" style="left: 5px !important;" class="related-button video-button-hover-image"  /> </span> <span class="video-button-hover"> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-lights.png" style="margin: 2px 0px 0px 0px; border: none; cursor: pointer;" alt="lights" /> <img src="<?php bloginfo('template_directory'); ?>/images/video-button-lights-hover.gif" alt="lights" style="left: 5px !important;" class="lights-button video-button-hover-image"  /> </span> </div>
    </div>
</div>
<?php else : ?>

	<?php $width = 950;
		  $height = 287;
				  
		  $classtext = 'single-image';
		  $titletext = get_the_title();

		  $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,false,'Image');
		  $thumb = $thumbnail["thumb"]; ?>
		  
	<?php if( isset($image) && $image != '') : ?>	  

		<div id="header2">  
			<div id="header3">
			   
			   <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?>
			   
			</div>
		</div>

	<?php endif; ?>
	
<?php endif; ?>
<div id="wrapper2">
<div id="container" style="position:relative;">

<a href="#" class="arrows-left"><img src="<?php bloginfo('template_directory'); ?>/images/left_arrow.png" alt=""></a>     

<a href="#" class="arrows-right"><img src="<?php bloginfo('template_directory'); ?>/images/right_arrow.png" alt=""></a>     

<div class="menu_custom" style="width:101px;"><br>
<div class="content"><ul class="cus"><li><a href="#">Video</a></li><li><a href="#">Blog</li><li><a href="#">News</a></li><li><a href="#">Contact</li></a></ul>



<div style="padding-top:200px; font-family:tahoma;">

Search by Tags:<br/>
tea party, tax cuts

</div>
</div>
</div>
    <div id="left-div">
	<style type="text/css">
#nav { margin: 20px auto }
#nav a { padding: 4px 6px; margin: 3px; border: 1px solid #ccc; text-align: center; text-decoration: none; background-color: #ddd }
#nav a.activeSlide { color: #c00 }
#nav a:focus { outline: none; }

.slideshow { margin: 5px auto; padding: 0; clear: left; }
.slide { margin: 0; padding: 0 }
.slideshow, .slide { height: 90px; width:948px; background:ccc; }
.slideshow img { padding: 5px; border: 1px solid #ccc; background-color: #eee; margin: 0 }

</style>

 
       <!-- <div class="home-post-wrap">
            <!--<div class="home-post-wrap-top">
                <div class="comment-buble">
                    <?php comments_popup_link('0', '1', '%'); ?>
                </div>
                <div class="date">
                    <?php the_time('m jS, Y') ?>
                </div>
            </div>-->
           <!-- <div class="thumbnail-div">
                
				<?php $width = 189;
					  $height = 175;
							  
					  $classtext = 'linkimage';
					  $titletext = get_the_title();

					  $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
					  $thumb = $thumbnail["thumb"]; ?>

                <?php // if there's a thumbnail
					if($thumb != '') { ?>
						<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?>
                <?php }; ?>
				
                <!--<div class="overlay"> </div>-->
                <!--<div class="post-info2">
                    <h2 class="post-info-title"><a href="<?php the_permalink() ?>" title="<?php printf(esc_attr__('Permanent Link to %s','eVid'), get_the_title()) ?>">
                        <?php truncate_title(30) ?>
                        </a></h2>
                    <div style="clear: both;"></div>
                    <?php get_template_part('includes/postinfo'); ?>
                </div>
            </div>
            <img src="<?php bloginfo('template_directory'); ?>/images/post-bottom-<?php echo esc_attr(get_option('evid_color_scheme')); ?>.gif" style="margin: 0px 0px 0px 0px; float: left;" alt="post bottom" /> </div>-->
    
        
		<div id="left-inside">
            <!--Begin Post-->
            <div class="post-wrapper">
			<?php if (get_option('evid_integration_single_top') <> '' && get_option('evid_integrate_singletop_enable') == 'on') echo(get_option('evid_integration_single_top')); ?>
                <h1 class="post-title"><?php the_title(); ?></h1>
				<!--<?php get_template_part('includes/postinfo'); ?>	-->

				<?php if (get_option('evid_thumbnails') == 'on') { get_template_part('includes/thumbnail'); } ?>
                <?php the_content(); ?>
				<?php if (get_option('evid_integration_single_bottom') <> '' && get_option('evid_integrate_singlebottom_enable') == 'on') echo(get_option('evid_integration_single_bottom')); ?>
                <?php if (get_option('evid_foursixeight') == 'on') { get_template_part('includes/468x60'); } ?>
                <div style="clear: both;"></div>
                <?php if (get_option('evid_show_postcomments') == 'on') { comments_template('', true); }; ?>
                <?php endwhile; ?>
            </div>
            <?php else : ?>
            <!--If no results are found-->
            <h1><?php esc_html_e('No Results Found','eVid') ?></h1>
            <p><?php esc_html_e('The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.','eVid') ?></p>
            <!--End if no results are found-->
            <?php endif; ?>
        </div></div>
    </div>
    <!--Begin Sidebar-->
    <?php //get_sidebar(); ?>
    <!--End Sidebar-->
    <!--Begin Footer-->
    <?php get_footer(); ?>
    <!--End Footer-->
</div>
</body>
</html>